package mercurius.fitness.client.rb.exercise;

import java.util.Date;

import net.pleso.framework.client.dal.db.types.DBDate;
import net.pleso.framework.client.dal.db.types.DBFloat;
import net.pleso.framework.client.dal.db.types.DBInteger;
import net.pleso.framework.client.dal.db.types.DBString;

public class ExerciseInfo {
	
	private Integer id = DBInteger.nullValue;
	private Date date = DBDate.nullValue;
	private String duration = DBString.nullValue;
	private Float distance = DBFloat.nullValue;
	private String distance_unit = DBString.nullValue;
	private Integer avghr = DBInteger.nullValue;
	private Integer maxhr = DBInteger.nullValue;
	private Float avgspeed = DBFloat.nullValue;
	private Float bestspeed = DBFloat.nullValue;
	private String avgpace = DBString.nullValue;
	private String bestpace = DBString.nullValue;
	private String speed_unit = DBString.nullValue;
	private String z1 = DBString.nullValue;
	private String z2 = DBString.nullValue;
	private String z3 = DBString.nullValue;
	private String z4 = DBString.nullValue;
	private String z5 = DBString.nullValue;
	private String activity = DBString.nullValue;
	private String notes = DBString.nullValue;
	private String title = DBString.nullValue;
	private String location = DBString.nullValue;
	private Integer pub = DBInteger.nullValue;
	
	public ExerciseInfo() {}
	
	public ExerciseInfo(Integer id, 
						Date date,
						String duration,
						Float distance,
						String distance_unit,
						Integer avghr,
						Integer maxhr,
						Float avgspeed,
						Float bestspeed,
						String avgpace,
						String bestpace,
						String speed_unit,
						String z1,String z2, String z3, String z4, String z5,
						String activity,
						String notes,
						String title,
						String location,
						Integer pub
						) {
		this.id = id;
		this.date = date;
		this.duration = duration;
		this.distance = distance;
		this.distance_unit = distance_unit;
		this.avghr = avghr;
		this.maxhr = maxhr;
		this.avgspeed = avgspeed;
		this.bestspeed = bestspeed;
		this.avgpace = avgpace;
		this.bestpace = bestpace;
		this.speed_unit = speed_unit;
		this.z1 = z1;
		this.z2 = z2;
		this.z3 = z3;
		this.z4 = z4;
		this.z5 = z5;
		this.activity = activity;
		this.notes = notes;
		this.title = title;
		this.location = location;
		this.pub = pub;
	}

	public Integer getID() {
		return id;
	}
	
	public void setID(Integer i) {
		id = i;
	}
	
	public Date getDate() {
		return date;
	}
	
	public void setDate(Date d) {
		date = d;
	}

	public String getDuration() {
		return duration;
	}

	public void setDuration(String d) {
		duration = d;
	}

	public Float getDistance() {
		return distance;
	}
	
	public void setDistance(Float d) {
		distance = d;
	}
	
	public String getDistanceUnit() {
		return distance_unit;
	}
	
	public String getDistanceUnitString() {
		if(distance_unit.equals("1")) {
			return "mi";
		} else if(distance_unit.equals("2")) {
			return "km";
		} else {
			return null;
		}
	}
	
	public void setDistanceUnit(String du) {
		distance_unit = du;
	}
	
	public Integer getAvgHR() {
		return avghr;
	}
	
	public void setAvgHR(Integer h) {
		avghr = h;
	}
	
	public Integer getMaxHR() {
		return maxhr;
	}
	
	public void setMaxHR(Integer m) {
		maxhr = m;
	}
	
	public Float getAvgSpeed() {
		return avgspeed;
	}
	
	public void setAvgSpeed(Float s) {
		avgspeed = s;
	}
	
	public Float getBestSpeed() {
		return bestspeed;
	}
	
	public void setBestSpeed(Float s) {
		bestspeed = s;
	}
	
	
	
	public String getAvgPace() {
		return avgpace;
	}
	
	public void setAvgPace(String s) {
		avgpace = s;
	}
	
	public String getBestPace() {
		return bestpace;
	}
	
	public void setBestPace(String s) {
		bestpace = s;
	}
	
	
	public String getSpeedUnit() {
		return speed_unit;
	}
	
	public String getSpeedUnitString() {
		if(speed_unit.equals("1")) {
			return "mi";
		} else if(speed_unit.equals("2")) {
			return "km";
		} else {
			return null;
		}
	}
	
	public void setSpeedUnit(String u) {
		speed_unit = u;
	}	
	
	public String getZ1Time() {
		return z1;
	}
	
	public void setZ1Time(String z) {
		z1 = z;
	}	
	
	public String getZ2Time() {
		return z2;
	}
	
	public void setZ2Time(String z) {
		z2 = z;
	}
	
	public String getZ3Time() {
		return z3;
	}
	
	public void setZ3Time(String z) {
		z3 = z;
	}	
	
	public String getZ4Time() {
		return z4;
	}
	
	public void setZ4Time(String z) {
		z4 = z;
	}	
	
	public String getZ5Time() {
		return z5;
	}
	
	public void setZ5Time(String z) {
		z5 = z;
	}	
	
	public String getActivity() {
		return activity;
	}
	
	public void setActivity(String a) {
		activity = a;
	}	
	
	public String getTitle() {
		return title;
	}
	
	public void setTitle(String n) {
		title = n;
	}
	
	public String getLocation() {
		return location;
	}
	
	public void setLocation(String n) {
		location = n;
	}
	
	public Integer getPublic() {
		return pub;
	}
	
	public void setPublic(Integer n) {
		pub = n;
	}
	
	public String getNotes() {
		return notes;
	}
	
	public void setNotes(String n) {
		notes = n;
	}
}
